package com.hcrazy.manchester.app.controllers;

import java.util.ArrayList;
import java.util.List;

import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.hcrazy.manchester.app.pojo.Test;

@Controller
public class TestController {

	@RequestMapping(value="/api/test",method=RequestMethod.GET,produces=MediaType.APPLICATION_JSON_VALUE)
	public @ResponseBody List<Test> getTestInfo(){
		Test test1 = new Test();
		test1.setTestId(1);
		test1.setTestString("这里是测试文本");
		test1.setTestText("<h2>这里是带html标记的文本</h2>");
		
		List<Test> list = new ArrayList<Test>();
		list.add(test1);
		
		Test test2 = new Test();
		test2.setTestId(2);
		test2.setTestString("这里是测试文本2");
		test2.setTestText("<h2>这里是带html标记的文本2</h2>");
		
		list.add(test2);
		
		return list;
	}

	
	@RequestMapping(value="/addComment",method=RequestMethod.GET)
	public void addComment(){
		
	}
	@RequestMapping(value="/addCommentWithResult",method=RequestMethod.GET)
	public void addCommentWithResult(){
		
	}
	
	@RequestMapping(value="/addSecondaryRequire",method=RequestMethod.GET)
	public void addSecondaryRequire(){
		
	}
	
	@RequestMapping(value="/addForRent",method=RequestMethod.GET)
	public void addForRent(){
		
	}
	
	@RequestMapping(value="/userCenter",method=RequestMethod.GET)
	public void userCenter(){
		
	}
}
